package com.server.questionbank.snframe.service.CourseService.Resource;

import com.server.questionbank.snframe.controller.Course.pojo.Resource.CreateCourseResource;
import com.server.questionbank.snframe.domain.Course.Resource.CourseFiles;
import com.server.questionbank.snframe.domain.Course.Resource.CourseResource;
import com.server.questionbank.snframe.domain.Course.Result.CourseResourceInfo;
import com.server.questionbank.snframe.mapper.Course.Resource.CourseResourcesMapper;
import org.springframework.http.ResponseEntity;
import org.springframework.web.multipart.MultipartFile;

import java.io.InputStream;
import java.util.List;

public interface CourseResourceService {
    // 获取课程资源列表
    public List<CourseResourceInfo> getResourceList(Long courseId);
    // 获取课程资源信息
    public CourseResourceInfo getResourceInfo(Long resourceId) throws Exception;
    // 获取课程资源信息
    public CourseResourceInfo getResourceInfoByFileId(Long fileId) throws Exception;

    // 创建课程资源
    public Boolean createResource(CreateCourseResource createCourseResource, Long createBy);
    // 上传文件
    public void uploadFlie(MultipartFile file, CourseResource courseResource) throws Exception;

    // 下载文件
    public InputStream downloadFile(String filePath, long start, long end) throws Exception;
    public InputStream downloadFile(String filePath) throws Exception;
}
